/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package homedatasender;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 *
 * @author tadas
 */
@PersistenceCapable
public class ConfigData {
    @Persistent(primaryKey="true", valueStrategy=IdGeneratorStrategy.NATIVE)
    private String IdField;
    @Persistent
    protected String DestEmail;
    @Persistent
    protected String SourceEmail;
    @Persistent
    protected String SmtpLogin;
    @Persistent
    protected String SmtpServer;
    @Persistent
    protected String SmtpPort;
    @Persistent
    protected String SmtpPassword;

    protected ConfigData()
    {
    }

    public ConfigData(String DestEmail, String SourceEmail, String SmtpLogin,
            String SmtpServer, String SmtpPort, String SmtpPassword){
        this.DestEmail = DestEmail;
        this.SourceEmail = SourceEmail;
        this.SmtpLogin = SmtpLogin;
        this.SmtpPassword = SmtpPassword;
        this.SmtpPort = SmtpPort;
        this.SmtpServer = SmtpServer;
    }

    /**
     * @return the DestEmail
     */
    public String getDestEmail() {
        return DestEmail;
    }

    /**
     * @param DestEmail the DestEmail to set
     */
    public void setDestEmail(String DestEmail) {
        this.DestEmail = DestEmail;
    }

    /**
     * @return the SourceEmail
     */
    public String getSourceEmail() {
        return SourceEmail;
    }

    /**
     * @param SourceEmail the SourceEmail to set
     */
    public void setSourceEmail(String SourceEmail) {
        this.SourceEmail = SourceEmail;
    }

    /**
     * @return the SmtpLogin
     */
    public String getSmtpLogin() {
        return SmtpLogin;
    }

    /**
     * @param SmtpLogin the SmtpLogin to set
     */
    public void setSmtpLogin(String SmtpLogin) {
        this.SmtpLogin = SmtpLogin;
    }

    /**
     * @return the SmtpServer
     */
    public String getSmtpServer() {
        return SmtpServer;
    }

    /**
     * @param SmtpServer the SmtpServer to set
     */
    public void setSmtpServer(String SmtpServer) {
        this.SmtpServer = SmtpServer;
    }

    /**
     * @return the SmtpPort
     */
    public String getSmtpPort() {
        return SmtpPort;
    }

    /**
     * @param SmtpPort the SmtpPort to set
     */
    public void setSmtpPort(String SmtpPort) {
        this.SmtpPort = SmtpPort;
    }

    /**
     * @return the SmtpPassword
     */
    public String getSmtpPassword() {
        return SmtpPassword;
    }

    /**
     * @param SmtpPassword the SmtpPassword to set
     */
    public void setSmtpPassword(String SmtpPassword) {
        this.SmtpPassword = SmtpPassword;
    }

    @Override
    public String toString(){
        return this.IdField +":" + this.DestEmail + ":" + this.SmtpLogin
                + ":" + this.SmtpPassword + ":" + this.SmtpPort
                + ":" + this.SmtpServer + ":" + this.SourceEmail;
    }
}
